package cn.lookup.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/exception")
public class ExceptionHandlerTest {
    @RequestMapping("/byZero")
    @ResponseBody
    public void byZeroException(){
        int i = 1/0;
    }
    @RequestMapping("/byNull")
    @ResponseBody
    public void byNullException(){
        String str = null;
        str.length();
    }
}
